<!--  -->
<template>
  <div class="home">
    <div class="userhome">
      <i class="iconfont icon-wode" @click="changeflag"></i>
      首页
    </div>
    <div class="content">
      <div class="image">
        <img src="@/assets/logo.png" alt="" />
      </div>
      <div class="tovideo">
        <i class="iconfont icon-gouwucheman"></i>
        推荐视频
      </div>
      <div class="video">
        <video
          src="@/assets/video/myvideo.mp4"
          width="100%"
          controls
          autoplay
          loop
          muted
        ></video>
      </div>
    </div>
    <transition class="textmask">
      <div class="mask" v-show="flag">
        <div class="maskmessage">个人信息</div>
        <div class="content">
          <ul>
            <li>
              <i class="iconfont icon-wodedangxuan"></i>
              Bob
            </li>
            <li>
              <i>$</i>
              15.0
            </li>
            <li>
              <i class="iconfont icon-shoucang1"></i>
              13526146642
            </li>
            <li>
              <i class="iconfont icon-daifukuan"></i>
              Bob@feicui.net
            </li>
          </ul>
          <div class="right" @click="changeflag"></div>
        </div>
      </div>
    </transition>
  </div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';

export default {
  //import引入的组件需要注入到components对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      flag: false,
    };
  },
  methods: {
    changeflag() {
      this.flag = !this.flag;
    },
  },
};
</script>
<style lang='less'>
.textmask-enter,
.textmask-leave-to {
  transform: translateX(100%);
}
.textmask-enter-active,
.textmask-leave-active {
  transition: all 0.5s linear;
}
.home {
  .userhome {
    width: 100%;
    height: 4.4rem;
    position: fixed;
    top: 0;
    left: 0;
    text-align: center;
    font-size: 1.6rem;
    line-height: 4.4rem;
    color: #494949;
    background: #efefef;
    font-weight: bold;
    .iconfont {
      position: fixed;
      left: 1rem;
      font-size: 3.6rem;
    }
  }
  .content {
    width: 100%;
    margin-top: 2.4rem;
    .image {
      width: 100%;
      height: 20rem;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .tovideo {
      width: 100%;
      height: 4.4rem;
      line-height: 4.4rem;
      padding: 0 0.5rem;
      font-weight: bold;
      border: 1px solid #efefef;
      i {
        margin-right: 0.2rem;
        font-size: 2rem;
      }
    }
    .video {
      padding: 2rem;
      border: 1px solid #efefef;
    }
  }
  .mask {
    width: 100%;
    height: 100%;
    background: #fff;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    .maskmessage {
      width: 100%;
      height: 4.4rem;
      position: fixed;
      top: 0;
      left: 0;
      text-align: center;
      font-size: 1.6rem;
      line-height: 4.4rem;
      color: #494949;
      border-bottom: 1px solid #bebebe;
      background: #efefef;
    }
    .content {
      position: fixed;
      top: 12%;
      left: 1%;
      width: 97%;
      height: 20rem;
      ul {
        display: flex;
        flex-direction: column;
        li {
          font-size: 2rem;
          padding: 0.5rem;
          color: #000;
          height: 4rem;
          line-height: 3rem;
          border: 1px solid #eeeeee;
          .iconfont {
            font-size: 2rem;
            color: #000;
          }
        }
      }
      .right {
        width: 20%;
        height: 100%;
        position: fixed;
        right: 0;
        top: 0;
        background: #7f7f7f;
      }
    }
  }
}
</style>